package com.py.credit.dao;

import com.py.credit.common.Page;
import com.py.credit.entity.Removal;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.List;
import java.util.Map;

public interface RemovalDao {

    /**
     * 获取列表详情页面
     *
     * @param jclb
     * @param type
     * @param showColumns
     * @param additionalColumns
     * @param conditions
     * @param page
     * @return
     */
    List<Map<String, Object>> selectByConditionForPage(@Param(value = "deptId") String deptId,
                                                       @Param(value = "jclb") String jclb,
                                                       @Param(value = "type") String type,
                                                       @Param(value = "columns") List<String> showColumns,
                                                       @Param(value = "additionalColumns") String[] additionalColumns,
                                                       @Param(value = "conditions") List<String> conditions,
                                                       @Param(value = "page") Page page);

    /**
     * 获取单条数据
     *
     * @param ajbh
     * @return
     */
    Removal selectInfo(@Param(value = "ajbh") String ajbh);

    void update(@Param(value = "ajbh") String ajbh,
                @Param(value = "updateTime") Timestamp updateTime);

    /**
     * 查询模板id
     *
     * @param status
     */
    Integer selectMbId(@Param(value = "status") String status);

    /**
     * 查询事件编号下所有部门的用户
     *
     * @param ajbh
     */
    void add(@Param(value = "name") String name,
             @Param(value = "type") String type,
             @Param(value = "mbId") int mbId,
             @Param(value = "userId") Long userId,
             @Param(value = "deptId") Long deptId,
             @Param(value = "ajbh") String ajbh,
             @Param(value = "operatorId") Long operatorId,
             @Param(value = "operatorDeptId") Long operatorDeptId);

    List<Long> selectDpet(@Param(value = "ajbh") String ajbh);

    List<Long> selectManagerDeptList(@Param(value = "id") String id);

    void updateExceedFailureStatus();
}
